There are many camera modules with auto-focusing function or vari-focus lenses built into cameras and camcorders. For camera modules with an auto-focusing function, the camera lens projects an image onto an image sensor, an AF module retrieves a portion of the image for a CPU to process the contrast information, the CPU then activates an auto-focus motor to move the lens into focus. This process is repeated until the object is accurately focused on. For camera modules with vari-focus lenses, the camera module generally includes at least two lens modules received in a lens holder. One of the two lens modules is driven to move back and forth to change a distance between the two lens modules so as to vary the focal length of the camera module.
The lens module may move back and forth a distance in the camera module in the above-described camera modules. To precisely control the movement of the lens module in the camera module, it is necessary to detect a position of the lens module in the camera module. Nowadays, it is common for a lens module system to evaluate a movement value for the lens module, and then for the lens module to be driven to travel through this movement value by a step motor. However, since the moving of the lens module is not monitored in real-time, the moving of the lens module cannot be precisely controlled. The result being that there is a difference between desired movement and real movement, and therefore there may be cases where a required focus cannot be achieved properly.
What is needed, therefore, is a camera module which overcomes the above-described problems.